from sqlalchemy import Column, Integer, String
from app.database import Base


class Test(Base):
    __tablename__ = "test"

    id = Column(Integer, primary_key=True, index=True)
    name = Column(String(50), index=True)  # 添加索引提高查询效率
    age = Column(Integer)

    # 可选的repr方法，便于调试
    def __repr__(self):
        return f"<Test id={self.id} name='{self.name}' age={self.age}>"